package com.netrust.cmsx.entity.module.cms;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 文章栏目关联表
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "t_article_category")
public class ArticleCategory {

	private Integer id;

	private Integer aid;

	private Integer cid;

	/*
	 * @JsonIgnore private SiteCategories siteCategories;
	 * 
	 * 
	 * @JsonIgnore private Article article;
	 */

	public ArticleCategory() {

	}

	/*
	 * public ArticleCategory(SiteCategories siteCategories, Article article) {
	 * super(); this.siteCategories= siteCategories; this.article = article; }
	 */

	public ArticleCategory(Integer id, Integer aid, Integer cid) {
		super();
		this.id = id;
		this.aid = aid;
		this.cid = cid;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "a_id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "a_aid")
	public Integer getAid() {
		return aid;
	}

	public void setAid(Integer aid) {
		this.aid = aid;
	}

	@Column(name = "a_cid")
	public Integer getCid() {
		return cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	/*
	 * @ManyToOne(fetch=FetchType.LAZY)
	 * 
	 * @JoinColumn(name="a_cid") public SiteCategories getSiteCategories() {
	 * return siteCategories; }
	 * 
	 * public void setSiteCategories(SiteCategories siteCategories) {
	 * this.siteCategories = siteCategories; }
	 * 
	 * @ManyToOne(fetch=FetchType.LAZY)
	 * 
	 * @JoinColumn(name="a_aid") public Article getArticle() { return article; }
	 * 
	 * 
	 * public void setArticle(Article article) { this.article = article; }
	 */
}